Repository navigation
fix: keep the post title outside the editable writing flow root - #837
Merged
Merged
Conversation
When the writing flow wrapper becomes an editing host, the title became plain editable content inside it, leaving the iOS caret stuck in the title. Core marks the title wrapper non-editable for the same reason (gutenberg#38892). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EB2aXCE1bcZisf7iy9zTLs
XCFramework BuildThis PR's XCFramework is available for testing. Add the following to your .package(url: "https://github.com/wordpress-mobile/GutenbergKit", branch: "pr-build/837")Built from 6a37fc3 |
crazytonyli
approved these changes
Oct 27, 2026
22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Keep the post title outside of the editable writing flow root.
Why?
It became near impossible to move the caret from the post title to a block. The caret erroneously moved back into the post title when attempting to move the caret to a block.
These changes partially address the problems presented in #821. They only address the post title. There are additional caret move issues referenced in WordPress/gutenberg#85483 (comment), therefore the previous patch disabling
editableRootis not yet removed.How?
Add
contentEditable={ false }to the post title component, matching core's post editor change in WordPress/gutenberg#38892.Testing Instructions
Accessibility Testing Instructions
Performing the testing instructions with a screen reader should also succeed.
Screenshots or screencast
See recording of the original issue in #821.
AI-generated details
Marks the post title wrapper
contentEditable={ false }, matching core's post editor (added in WordPress/gutenberg#38892).When the writing flow wrapper becomes an editing host (during a multi-selection, or whenever a block that opts into
editableRootis selected), a title without a non-editable wrapper becomes ordinary editable content inside that host instead of its own field. On iOS, taps then leave the caret stuck in the title while focus and block selection move elsewhere. This was GBK-specific: core's own title wrapper has the attribute, which is why the bug didn't reproduce in core.#821 removed the Paragraph and List Item
editableRootopt-ins, so on trunk the wrapper only becomes editable during a multi-selection. This fix is needed before those opt-ins can return.Testing: to reproduce on trunk, remove the
editableRootKeyhunks frompatches/@wordpress+block-library+11.2.0.patchand reinstall dependencies. On iOS, select a paragraph, tap the post title, and type: the text should go into the title.🤖 Generated with Claude Code
https://claude.ai/code/session_01EB2aXCE1bcZisf7iy9zTLs